﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace T_settlement.Infrastructure
{
    public interface IRepository<T> where T : class
    {
        //添加
        Task<int> AddAsync(T t);

        /// 删除   
        Task<int> Delete(int id);

        //修改
        Task<int>UpdateAsync(T t);


        Task<int> UpdateAsyncRange(List<T> info);


        //查找住键ID
        Task<T> GetModelAsync(int id);


        //无条件显示
        Task<List<T>> GetAllAsync();


        Task<T> GetAllAsync(Expression<Func<T, bool>> expre);


        Task<List<T>> GetAsync(Expression<Func<T, bool>> expre);


    }
}
